<template>
	<!-- 工单完工 -->
	<div class="mO_PO_WorkOrderbatchComplate-container">
		
	</div>
</template>
<style scoped>
	:deep(.el-select),
	:deep(.el-input-number) {
		width: 100%;
	}
</style>
<script lang="ts" setup>
	import { ref, onMounted } from "vue";
	import { ElMessage,ElMessageBox } from "element-plus";
	import type { FormRules } from "element-plus";
  import request from '/@/utils/request';

	//父级传递来的参数
	var props = defineProps({
		title: {
			type: String,
			default: "",
		},
	});
	//父级传递来的函数，用于回调
	const emit = defineEmits(["reloadTable"]);
	let mianPageData = ref<any>();
	
	const commentClick = async (row : any, type : number) => {
		ElMessageBox.confirm(`确定要迁移吗?`, "提示", {
			confirmButtonText: "确定",
			cancelButtonText: "取消",
			type: "warning",
		})
			.then(async () => {
				await GO(row);
			})
			.catch(() => { });
	}
	
	// 打开弹窗
	const GO =async (row : any,type:number) => {
		let postData=[];
		mianPageData.value = row
		if(row.value!=undefined && row.value.length >0){
			postData = row.value
		}else{
			postData = [row]
		}
		let url=`api/SysDataTransfer/startTransfer`;
		var res = await request({url: url,method: 'post',data:postData });
		emit("reloadTable");
	};
	// // 提交
	// const submit = async () => {
	
	// 	let url=`api/mO_PO_WorkOrderOperation/SplitBatch/${mianPageData.value.id}/${splitCount}`;
	// 	var res = await request({url: url,method: 'get'});
	
	// };

	//将属性或者函数暴露给父组件
	defineExpose({ commentClick });
</script>